package com.sxf.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sxf.dao.LinkDAO;
import com.sxf.domain.blog.Link;
import com.sxf.domain.viewbean.LinkVO;
import com.sxf.mybatis.page.Pagination;
import com.sxf.querybean.LinkQuery;
import com.sxf.service.LinkService;
@Service
public class LinkServiceImpl implements LinkService {
	@Resource
	private LinkDAO dao;

	@Override
	public Pagination<LinkVO> queryPage(LinkQuery query) {
		return dao.queryPage(query);
	}

	@Override
	public List<LinkVO> queryList(LinkQuery query) {
		return dao.queryList(query);
	}

	@Override
	public LinkVO queryOne(LinkQuery query) {
		return dao.queryOne(query);
	}

	@Override
	public long queryNumber(LinkQuery query) {
		return dao.queryNumber(query);
	}

	@Override
	public Map<String, Integer> queryStatistic() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int insert(Link link) {
		return dao.insert(link);
	}

	@Override
	public int update(Link link) {
		return dao.update(link);
	}

	@Override
	public int delete(Link link) {
		return dao.delete(link);
	}

	public void setDao(LinkDAO dao) {
		this.dao = dao;
	}
}
